package com.usa.tool;

import java.util.Arrays;
import java.util.stream.Collectors;

/**
 * @author YueGod
 * @since 2023/12/2
 */
public class Distinct {

    public static void main(String[] args) {
        String s = "aaa,bbb,ccc,bbb,ddd";

        String[] split = s.split(",");
        System.out.println(Arrays.toString(split));

        System.out.println(Arrays.stream(split).collect(Collectors.toSet()));
    }

}
